<h1>Adicionar fornecedor</h1>
<?php
echo $this->Form->create('Fornecedor') ;
echo $this->Form->input('nome', array('class'=>'form-control', 'div' => array('class'=>'form-group')));
echo $this->Form->input('telefone', array('class'=>'form-control', 'div' => array('class'=>'form-group')));
echo $this->Form->input('email', array('class'=>'form-control', 'div' => array('class'=>'form-group')));
echo $this->Form->input('endereco', array('class'=>'form-control', 'div' => array('class'=>'form-group')));
echo $this->Form->input('numero_endereco', array('class'=>'form-control', 'div' => array('class'=>'form-group')));
echo $this->Form->input('complemento', array('class'=>'form-control', 'div' => array('class'=>'form-group')));
echo $this->Form->input('bairro', array('class'=>'form-control', 'div' => array('class'=>'form-group')));
echo $this->Form->input('cep', array('class'=>'form-control', 'div' => array('class'=>'form-group')));
echo '<div class="form-group"><label for="estado">Estado</label>';
echo $this->Form->select('estado', null, array("id"=>"estado", "class"=>"form-control"));
echo '</div>';
echo '<div class="form-group"><label for="cidade">Cidade</label>';
echo $this->Form->select('cidade', null, array("id"=>"cidade", "class"=>"form-control"));
echo '</div>';
echo $this->Form->submit('Salvar fornecedor', array('class'=>'btn btn-default'));
echo $this->Form->end() ;
?>
<?php echo $this->Html->script('cidades-estados-1.2-utf8'); ?>
<script type="text/javascript">
window.onload = function() {
  new dgCidadesEstados({
    estado: document.getElementById('estado'),
    cidade: document.getElementById('cidade')
  });
}
</script>
